import  sys
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from PyQt5.QtWebEngineWidgets import *
class MainWindow(QMainWindow):
    def __init__(self):
        super(QMainWindow,self).__init__()
        self.setWindowTitle("打开网页")
        self.setGeometry(6,36,1000,700)
        self.browser=QWebEngineView()
        self.browser.setHtml('''
        
         <!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
  hellp  pyqt

</body>
</html>
        ''')
        self.setCentralWidget(self.browser)
if __name__ == '__main__':
    app=QApplication(sys.argv)
    win=MainWindow()
    win.show()
    sys.exit(app.exec_())
